/* body[data-color-mode='dark']'] { */
body[data-theme-mode='dark'] {
    /* figma CSS 自定义属性 */
    --bg-primary-btn: #18a0fb;
    --bg-toolbar: #2c2c2c;
    --bg-toolbar-hover: #000;
    --bg-toolbar-active: #18a0fb;
    --bg-toolbar-selection: #18a0fb;
    --fg-toolbar: hsla(0, 0%, 100%, 0.8);
    --fg-toolbar-hover: #fff;
    --fg-toolbar-active: #fff;
    --fg-toolbar-disabled: hsla(0, 0%, 100%, 0.5);
    --fg-toolbar-filename: #fff;
    --fg-toolbar-foldername: #aaa;
    --fg-toolbar-chevron: #fff;
    --fg-toolbar-unsavedicon: hsla(0, 0%, 100%, 0.4);
    --bg-overlay: #222;
    --bg-overlay-active: #18a0fb;
    --bg-overlay-outline: rgba(0, 0, 0, 0.1);
    --bg-overlay-inner-outline: #000;
    --fg-overlay: #fff;
    --fg-overlay-active: #fff;
    --fg-overlay-secondary: hsla(0, 0%, 100%, 0.4);
    --fg-overlay-sep: hsla(0, 0%, 100%, 0.2);
    --fg-overlay-right: #fff;

    /* darkmode CSS 自定义属性 */
    --dark-bg-primary: #0d1117;
    --dark-bg-canvas: #222;
    --dark-border-primary: #4c4c4c;
    --dark-border-secondary: #2f2f2f;
    --dark-text-primary: #fff; /*#c9d1d9;*/
    --dark-text-secondary: #8b949e;
}

[data-theme-mode='dark'] [class*='in_app_page--appFont'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='sidebar--sidebarScrollContainer'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='sidebar--navContent'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='sidebar--navDefault'] {
    box-shadow: 1px 0 0 0 var(--dark-border-primary);
}

[data-theme-mode='dark'] [class*='sidebar--selected'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='sidebar--divider'] {
    background-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='sidebar--lastSectionFixed'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='user_view--rowWithDivider'] {
    border-bottom-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='user_view--newToken'] {
    fill: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='raw_components--_iconButton'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

[data-theme-mode='dark'] [class*='raw_components--_iconButton']:hover {
    color: var(--dark-text-primary);
    fill: currentColor;
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark']
    [class*='file_browser_view--fileBrowserPageViewContaine'] {
    color: var(--dark-text-primary);
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='new_team_link--buttonHover']:hover {
    color: var(--dark-text-primary);
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='tool_bar--toolBarContainer'] {
    background-color: var(--dark-bg-canvas);
    box-shadow: 0 1px 0 0 var(--dark-border-primary);
}

[data-theme-mode='dark'] [class*='tab--unselected'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='tab--unselected']:hover,
[data-theme-mode='dark'] [class*='tab--selected'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='tool_bar--toolBarButton'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark']
    [class*='tool_bar--toolBarButton']:hover:not(:disabled) {
    color: var(--dark-text-primary);
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='plugin_tiles--installedPluginsListContainer'],
[data-theme-mode='dark']
    [class*='plugin_tiles--localPluginDownloadDesktopApp'] {
    border-right-color: var(--dark-border-primary);
}

[data-theme-mode='dark'] [class*='plugin_tiles--h2'],
[data-theme-mode='dark'] [class*='plugin_tiles--h3'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='inspect_panels--inspectionPanel'],
[data-theme-mode='dark'] [class*='avatar--handle'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='properties_panel--propertiesPanel'],
[data-theme-mode='dark'] [class*='properties_panel--propertiesPanel'] ~ div {
    border-left-color: var(--dark-border-secondary);
}
[data-theme-mode='dark']
    [class*='object_row--selected']:not([class*='object_row--disabled']),
[data-theme-mode='dark'] [class*='pages_panel--pageRow'] {
    background-color: var(--dark-bg-canvas);
}
[data-theme-mode='dark'] [class*='profile_resources_grid--selected'],
[data-theme-mode='dark'] [class*='profile_resources_grid--tabLink']:hover {
    color: var(--dark-text-primary);
}
[data-theme-mode='dark'] [class*='profile_resources_grid--profileDataHandle'],
[data-theme-mode='dark'] [class*='profile_resources_grid--tabLink'] {
    color: var(--dark-text-secondary);
}
[data-theme-mode='dark'] [class*='community_hub_banner--bannerContainer'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='profile_resources_grid--viewBar'] {
    box-shadow: 0 0 0 1px var(--dark-border-secondary);
}

[data-theme-mode='dark']
    [class*='avatar--avatarWithHandle']
    [class*='avatar--handle'] {
    color: var(--dark-text-primary);
}

/* community detail */
[data-theme-mode='dark'] [class*='community_hub_landing--categoryHeader'],
[data-theme-mode='dark'] [class*='following_feed--sectionHeader'],
[data-theme-mode='dark']
    [class*='discover_creators--discoverCreatorsLargeHeader'],
[data-theme-mode='dark'] [class*='detail_view--_name'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='community_hub_landing--categoryDescription'],
[data-theme-mode='dark'] [class*='following_feed--sectionHeaderSubtext'],
[data-theme-mode='dark']
    [class*='discover_creators--discoverCreatorsLargeSubheader'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='community_hub_landing--tabLink--'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='community_hub_landing--tabLink--']:hover,
[data-theme-mode='dark'] [class*='community_hub_landing--selected--'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='community_hub_landing--resourceTypeViewBar'] {
    border-top-color: var(--dark-border-secondary);
}

[data-theme-mode='dark']
    [class*='community_hub_view_bar--stickyHeaderIsSticky'] {
    border-bottom-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='category_pills--categoryPill'] {
    border: 1px solid var(--dark-border-primary);
}
[data-theme-mode='dark'] [class*='community_hub_view_bar--viewBar'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='basic_form--btn'] {
    color: var(--dark-text-primary);
    border: 2px solid var(--dark-border-primary);
}
[data-theme-mode='dark'] [class*='detail_view--subheader'],
[data-theme-mode='dark'] [class*='detail_view--shareLinkIcon'],
[data-theme-mode='dark'] [class*='detail_view--shareLinkText'],
[data-theme-mode='dark'] [class*='hub_file_detail_view--remixesSeeAllLink'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}
[data-theme-mode='dark'] [class*='tags_list--tag--'] {
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-border-primary);
}
[data-theme-mode='dark'] [class*='detail_view--reportSection'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] .ql-editor blockquote,
[data-theme-mode='dark'] .ql-editor h1,
[data-theme-mode='dark'] .ql-editor h2,
[data-theme-mode='dark'] .ql-editor ol,
[data-theme-mode='dark'] .ql-editor p,
[data-theme-mode='dark'] .ql-editor pre,
[data-theme-mode='dark'] .ql-editor ul {
    color: var(--dark-text-primary);
}

/* search page */
[data-theme-mode='dark']
    [class*='community_hub_landing--_communityHubContentBackground'] {
    background-color: var(--dark-bg-canvas);
}
[data-theme-mode='dark'] [class*='search--searchIcon'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}
[data-theme-mode='dark'] input {
    background-color: var(--dark-bg-canvas) !important;
    color: var(--dark-text-primary) !important;
}
[data-theme-mode='dark'] [class*='search_model_toggle--tabCountUnhighlighted'],
[data-theme-mode='dark'] [class*='search_results_view--emptyStateText'] {
    color: var(--dark-text-primary);
}
[data-theme-mode='dark'] [class*='search_scope_toggle--selected'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark']
    [class*='tile_sort_filter--dropdownContainerDisabled'] {
    color: var(--dark-text-secondary);
    fill: currentColor;
}
/* team page */
[data-theme-mode='dark'] [class*='folder_list_card--folderCard'] {
    border: 1px solid var(--dark-border-secondary);
}
[data-theme-mode='dark'] [class*='org_home_view_meta_content--description'],
[data-theme-mode='dark'] [class*='folder_list_card--folderActivity'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='org_home_view_meta_content--orgName'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='upgrade_section--sidebarDivider'] {
    color: var(--dark-border-secondary);
    background-color: var(--dark-border-secondary);
}

/* recent page */
[data-theme-mode='dark'] [class*='generic_tile--title'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='generic_tile--pinnedSubtitle'],
[data-theme-mode='dark'] [class*='generic_tile--subtitle'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='option_button--_optionButton'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

[data-theme-mode='dark']
    [class*='option_button--_optionButton']:not([class*='option_button--disabled']):hover {
    background-color: var(--dark-bg-primary) !important;
    fill: currentColor !important;
}

[data-theme-mode='dark'] [class*='search_view_bar--searchModelToggles'],
[data-theme-mode='dark'] [class*='search_view_bar--searchParameters'],
[data-theme-mode='dark'] [class*='tiles_view--listHeaderContainer'] {
    background-color: var(--dark-bg-canvas);
}

/* drafts page */
[data-theme-mode='dark'] [class*='left_panel--panelContainer'],
[data-theme-mode='dark'] [class*='pages_panel--objectPanelContent'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='object_row--row'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='pages_panel--tab']::after {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='pages_panel--tab']:hover::after {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='pages_panel--tabActive']::after {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='object_row--row'],
[data-theme-mode='dark']
    [class*='object_row--row']
    [class*='object_row--layerIcon'] {
    color: var(--dark-text-primary) !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

[data-theme-mode='dark'] [class*='left_panel--panelContainer'] {
    background-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='properties_panel--propertiesPanel'],
[data-theme-mode='dark'] [class*='properties_panel--propertiesPanel'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] .cachedSubtree > [class*='raw_components--panel'] {
    border-bottom-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='draggable_list--panelTitleText'] {
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='raw_components--base'] {
    color: var(--dark-text-primary);
    fill: currentColor !important;
}

[data-theme-mode='dark']
    [class*='paint_panels--colorValueContainer']:focus-within {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='segmented_control--segmentSelected'] {
    color: var(--dark-text-primary);
    fill: currentColor !important;
}

[data-theme-mode='dark'] button[class*='export_panel--exportButton'] {
    border: 1px solid var(--dark-border-primary);
}

/* pannel */
[data-theme-mode='dark'] [class*='close_button--closeX'],
[data-theme-mode='dark'] [class*='hint_panel--onboardingDismissIcon'],
[data-theme-mode='dark'] [class*='hint_panel--onboardingIcon'],
[data-theme-mode='dark'] [class*='export_panel--chevron'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

[data-theme-mode='dark']
    [class*='collapsible_property_panel--panelEmptyTitleRow']:hover
    [class*='collapsible_property_panel--panelTitle'],
[data-theme-mode='dark']
    [class*='collapsible_property_panel--panelEmptyTitleRow']:hover
    [class*='collapsible_property_panel--titleButton'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

[data-theme-mode='dark'] [class*='segmented_control--segmentUnselected'] {
    color: var(--dark-text-secondary);
    fill: currentColor;
}

[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--selected']:not([class*='object_row--disabled']) {
    background-color: var(--dark-bg-primary) !important;
}

[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--parentSelected'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='component_sidebar--container'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='library_item_tile--thumbWrapper'],
[data-theme-mode='dark'] [class*='library_item_tile--thumbWrapperListView'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='library_item_tile--nameGrid'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='library_section_header--sectionHeaderH1'] {
    background-color: var(--dark-bg-primary);
    color: var(--dark-text-primary);
}

[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--frame'][class*='object_row--topLevel'][class*='object_row--selected']:not([class*='object_row--disabled']) {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--instance'][class*='object_row--parentSelected'],
[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--instanceChild'][class*='object_row--parentSelected'],
[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--stateGroup'][class*='object_row--parentSelected'],
[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--symbol'][class*='object_row--parentSelected'],
[data-theme-mode='dark']
    [class*='object_row--row'][class*='object_row--symbolChild'][class*='object_row--parentSelected'] {
    background-color: var(--dark-bg-primary) !important;
}

/* oooops! has error */
[dark-theme-mode='dark']
    [class*='object_row--row--'][class*='object_row--instance--'][class*='object_row--topLevel--'][class*='object_row--selected--'],
[dark-theme-mode='dark']
    [class*='object_row--row--'][class*='object_row--stateGroup--'][class*='object_row--topLevel--'][class*='object_row--selected--'],
[dark-theme-mode='dark']
    [class*='object_row--row--'][class*='object_row--symbol--'][class*='object_row--topLevel--'][class*='object_row--selected--'] {
    background-color: var(--dark-bg-primary) !important;
}

[data-theme-mode='dark'] [class*='object_row--rowText'],
[data-theme-mode='dark'] [class*='object_row--rowActions'] {
    background-color: transparent;
}

[data-theme-mode='dark'] [class*='properties_panel--tabsHeaderBordered'],
[data-theme-mode='dark'] [class*='raw_components--panel'],
[data-theme-mode='dark'] [class*='properties_panel--versionHistoryPanel'] {
    border-bottom-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='basic_form--btn'] {
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-border-primary);
}

[data-theme-mode='dark'] [class*='left_panel--panelContainer'] {
    border-right-color: var(--dark-border-secondary);
}

[data-theme-mode='dark']
    [class*='search--margin12__DEPRECATED']
    [class*='search--searchInput__DEPRECATED'] {
    filter: invert(1);
}

[data-theme-mode='dark'] [class*='properties_panel--border'] {
    border-top-color: var(--dark-border-secondary);
}

[data-theme-mode='dark'] [class*='raw_components--rowSelectedSecondary'],
[data-theme-mode='dark']
    [class*='raw_components--rowSelectedSecondary']
    [class*='raw_components--chitCenter'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark']
    [class*='pages_panel--pageRow--'][class*='pages_panel--hoverByMouse']:hover,
[data-theme-mode='dark']
    [class*='pages_panel--pageRow--'][class*='pages_panel--hoverState'] {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='footer_banner--container'],
[data-theme-mode='dark'] [class*='footer_banner--banner'] {
    background-color: var(--dark-bg-primary);
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='auth_modal--modal'] {
    background-color: var(--dark-bg-canvas);
    color: var(--dark-text-primary);
}

[data-theme-mode='dark'] [class*='landing_form--googleButton--'] {
    background-color: var(--dark-bg-canvas);
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-border-primary);
}

[data-theme-mode='dark'] [class*='landing_form--googleButton--']:hover {
    background-color: var(--dark-bg-primary);
}

[data-theme-mode='dark'] [class*='sign_in_and_up--orBlock'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark'] [class*='auth_view--footerText'] {
    color: var(--dark-text-secondary);
}

[data-theme-mode='dark']
    [class*='select--container']:hover
    [class*='select--input']:not([class*='select--inputDisabled'])
    [class*='select--chevron'],
[data-theme-mode='dark']
    [class*='select--hiddenInput']:focus
    ~ [class*='select--input']:not([class*='select--inputDisabled'])
    [class*='select--chevron'],
[data-theme-mode='dark']
    [class*='select--input']:not([class*='select--inputDisabled']):focus
    [class*='select--chevron'],
[data-theme-mode='dark']
    [class*='select--selectInputExpanded']
    [class*='select--chevron'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

[data-theme-mode='dark'] [class*='style_icon--image'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

[data-theme-mode='dark'] [class*='component_tiles--sectionHeader'] {
    color: var(--dark-text-primary);
    fill: currentColor;
}

/* canvas */
[data-theme-mode='dark'] [class*='fullscreen_view--page'],
[data-theme-mode='dark'] #fullscreen-root .container-view,
[data-theme-mode='dark'] #fullscreen-root .gpu-view-content canvas {
    background-color: var(--dark-bg-canvas) !important;
    fill: currentColor !important;
}

[data-theme-mode='dark'] [class*='fullscreen_view--page'] {
    background-color: var(--dark-bg-canvas);
}

::-webkit-scrollbar-thumb {
    background-color: var(--dark-bg-canvas);
    box-shadow: 0 0 1px var(--dark-bg-primary);
}

/* widgets  */
[data-theme-mode='dark'] [class*='draggable_modal--frame'] {
    background-color: var(--dark-bg-canvas);
}

[data-theme-mode='dark'] [class*='color_picker_styles--panel'] {
    border-top-color: var(--dark-border-secondary);
}

/* atom one dark */
.hljs {
    display: block;
    overflow-x: auto;
    padding: 0.5em;
    color: #abb2bf;
    background: #282c34;
}

.hljs-comment,
.hljs-quote {
    color: #5c6370;
    font-style: italic;
}

.hljs-doctag,
.hljs-keyword,
.hljs-formula {
    color: #c678dd;
}

.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
    color: #e06c75;
}

.hljs-literal {
    color: #56b6c2;
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
    color: #98c379;
}

.hljs-built_in,
.hljs-class .hljs-title {
    color: #e6c07b;
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
    color: #d19a66;
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
    color: #61aeee;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

.hljs-link {
    text-decoration: underline;
}
